package com.centanet.framework.rx;

import android.content.Context;

import java.io.File;

import rx.Observable;

/**
 * RxFolder
 * Created by guilin on 16/1/12.
 */
public final class RxFolder {

    private RxFolder() {
        //Utility Class
    }

    /**
     * 计算文件夹大小
     *
     * @param file 文件夹
     * @return Observable<String>
     */
    public static Observable<String> folderSize(File file) {
        return Observable.create(new FolderSizeOnSubcribe(file));
    }

    /**
     * 清除glide缓存
     *
     * @param context Context
     * @return boolean
     */
    public static Observable<Boolean> clearGlideCache(Context context) {
        return Observable.create(new ClearGlideCacheOnSubscribe(context));
    }

}
